<?php
        require_once("includes/overhead.php");

	if (isset($_POST['name']) && isset($_POST['category']) && isset($_POST['email']) && isset($_POST['comments']) && isset($_POST['george'])) {
		if (($_POST['george'] != 'burdell') && ($_POST['george'] != 'Burdell')) {
			$error="Are you sure you got our buddy George's last name right?";
		}
		else {
			if (!mail("cases@gtsga.fogbugz.com","Course Critique Feedback (".mysql_real_escape_string($_POST['category']).")", "Name: ".$_POST['name']." \n".$_POST['comments'] , "From: 
".$_POST['email'] )) {
				$error="Message send failed.";
			}
		
		}
	}
	

	$pageTitle="Contact the Course Critique Team";
	$breadcrumbs[0]['URL']='index.php';
	$breadcrumbs[0]['Title']='Course Critique';
	$breadcrumbs[1]['URL']='contact.php';
	$breadcrumbs[1]['Title']='Contact the Team';
	$didYouKnow['Title']='News';
	$didYouKnow['Content']="CIOS Integration is up and running!";
	$content = "
	<h3>We'd love to hear from you!</h3>".(isset($error) ? "<font color='red'><strong>".$error."</strong></font>" : (isset($_POST['name']) ? "<font color='green'>Message sent! Thanks!</font>" : ""))."
	<h4>We need <strong>you</strong> to tell us what we're doing <i>right</i> and, perhaps more importantly, what we're doing <i>wrong.</i></h4>
	<form method='POST' action='contact.php'>
	<p>First, we'd really love it if you would tell us <strong>your name!</strong><br /> <input type='text' name='name' /><br />
	An <strong>email address</strong> where we can reach you would be <i>fantastic</i>!<br />
	<input type='text' name='email' /><br />
	Please categorize your comment: <select name='category'><option>Error</option><option>Question</option><option>General Complaint</option><option>Other</option></select><br />
	Just to make sure you're not a robot, what's the <strong>last name of Tech's most famous, imaginary alum</strong>? <br /><input type='text' name='george' /><br />
	And finally, <strong>let us know what's on your mind!</strong><br />
	<textarea name='comments' cols='100' rows='25'>(Tip: Getting an error? Specific error messages are VERY helpful!)</textarea><br /><br />
	<input type='submit' value='Send Message' />
	</form>
	</p>
	
	";
	include("views/stdPage.php");
?>
